#!/bin/bash

val=2

function chval() {
    local val=5
}

echo "before function val is ${val}"

chval

echo "after function val is ${val}"
